<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
  <title>好味道</title>
  <link rel="icon" href="./images/favicon.ico">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,user-scalable=no,minimal-ui">
  <link rel="stylesheet" href="styles/vant.min.css"/>
  <link rel="stylesheet" href="../backend/plugins/element-ui/index.css" />
  <style>
    *{
      padding: 0;
      margin: 0;
    }
    html,
    body{
      height: 100%;
    }

    .bodys{
      height: 100%;
      display: flex;
      flex-direction:column;
    }
    .iframe{
      padding: 0;
      margin: 0;
      flex: 9;
      width: 100%;
      border: none;
    }
    .buttom{
      border-top: #dddddd solid 1px;
      width: 100%;
      flex:1;
      display: flex;
      justify-content: space-around;
      align-items: center;
      font-size: 8px;
      /*background: #3a8ee6;*/
    }
    .buttom a{
      display: flex;
      flex-direction:column ;
      text-align: center;
    }
    .buttom a div{
      font-size: 35px;
    }
    iframe html{
      width: 100%;
    }
  </style>

</head>
<body>

<div class="bodys">
  <iframe
          id="iFrm1"
          class="iframe"
          name='my-iframe'
          width="100%"
  >
  </iframe>
  <div class="buttom">
    <a href='./shouye.html' target='my-iframe' >
      <div class="el-icon-goods"></div>
      <span>首页</span>
    </a>
    <a href='./page/order.html' target='my-iframe' >
      <div class="el-icon-s-unfold"></div>
      <span>订单</span>
    </a>
    <a href='./page/user.html' target='my-iframe' >
      <div class="el-icon-user"></div>
      <span>我的</span>
    </a>
  </div>
</div>
<script src="./js/jquery-2.1.0.js"></script>
<script src="../backend/plugins/element-ui/index.js"></script>
<script src="./js/vant.min.js"></script>
<!-- 引入axios -->
<script src="../backend/plugins/axios/axios.min.js"></script>
<script src="js/request.js"></script>
<script>
  $(function (){
    $.get(
            '/food/history',
            function (data){
              if(data.code == 0){
                window.location.href="./load.html";
              }
            },
            "json"
    )
  })
 $(".buttom").children()[0].click()
  //动态监听
  var ifrm1 = document.getElementById('iFrm1');
  ifrm1.onload = function() {
    //跳转定位
    ifrm1.contentWindow.document.querySelector('.dizhi').addEventListener("click",function (){
      window.location.href="./page/address.html";
    })
    //跳转搜素
    ifrm1.contentWindow.document.querySelector('.search').addEventListener("click",function (){
      window.location.href="./page/Serch.html";
    })
    //跳转店铺列表
    ifrm1.contentWindow.document.querySelector('.shop').addEventListener("click",function (){
      window.location.href="./index.html";
    })
  }
</script>
</body>
</html>